package com.toocms.jinjuhang.ui.mine.payment.bank.add;

import android.os.Bundle;

import com.toocms.jinjuhang.BR;
import com.toocms.jinjuhang.R;
import com.toocms.jinjuhang.databinding.FgtAddBankBinding;
import com.toocms.jinjuhang.ui.base.BaseFgt;
import com.toocms.jinjuhang.ui.mine.payment.bank.code.CodeFgt;

/**
 * @Description:
 * @Author: Zero
 * @CreateDate: 2023/5/19 9:59
 */
public class AddBankFgt extends BaseFgt<FgtAddBankBinding, AddBankViewModel> {

    @Override
    protected void onFragmentCreated() {
        topBar.setTitle("添加银行卡");
    }

    @Override
    protected int getLayoutResId() {
        return R.layout.fgt_add_bank;
    }

    @Override
    public int getVariableId() {
        return BR.addBankViewModel;
    }

    @Override
    protected void viewObserver() {
        viewModel.showCodeEvent.observe(this,s -> {
            CodeFgt dialog = new CodeFgt();
            Bundle bundle = new Bundle();
            bundle.putString("signid", s);
            dialog.setArguments(bundle);
            dialog.show(getChildFragmentManager(), "");
        });
    }
}
